<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="../js/react.js"></script>
  <script src="../js/react-dom.js"></script>
  <script src="https://unpkg.com/babel-core@5.8.38/browser.min.js"></script>
  <title>demo09</title>
</head>
<body>
<div id="example"></div>
<script type="text/babel">
var Input = React.createClass({
  getInitialState: function() {
    return {value: 'Hello'}
  },
  handleChange: function(event) {
    this.setState({value: event.target.value});
  },
  render: function() {
    var value = this.state.value;
    return (
      <div>
        <input type="text" value={value} onChange={this.handleChange} />
        <p>{value}</p>
      </div>
    )
  }
});
ReactDOM.render(<Input />, document.getElementById('example'));
</script>
</body>
</html>
